package com.hong.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "nacos",tags = {"nacos"})
@RefreshScope
@RestController
public class ClientController {

    private Logger logger = LoggerFactory.getLogger(ClientController.class);


    @Value("${app.name}")
    private String appName;

    @ApiOperation(value = "获取app信息")
    @GetMapping("client")
    public String getApp(){
        logger.info("生产环境name: {}",appName);

        return appName;
    }


}
